﻿define(["jquery", "knockout", "categoryAjax"], function ($, ko, categoryAjax) {
    var viewModel = function () {
        var self = this;

        self.categories = ko.observableArray();

        self.init = function () {
            categoryAjax.getCategories(parseCategory);
        };

        function parseCategory(categories) {
            self.categories(categories);
        }
    };

    return  new viewModel();
});